/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package serveur;

import java.net.Inet4Address;
import java.net.UnknownHostException;
import shared.Cpu;
import shared.ProcessList;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import shared.Memory;

/**
 *
 * @author ju
 */
public class MonitoringImpl extends UnicastRemoteObject  implements shared.Monitoring {

    public MonitoringImpl() throws RemoteException {
    }

    @Override
        public ProcessList getProcessusReal() throws RemoteException {
        return ProcessusFactory.getProcessus();
    }
    
    @Override
        public  Cpu getCpuReal() throws RemoteException {
        return  CpuFactory.getCpu();
    }

  @Override
        public  Memory getMemoryReal() throws RemoteException {
        return  MemoryFactory.getMemory();
    }

    @Override
    public String getServ() throws RemoteException {
        try {
            return Inet4Address.getLocalHost().getHostAddress();
        } catch (UnknownHostException ex) {
            Logger.getLogger(MonitoringImpl.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }
    
    
}
